<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="com.gzgi.framework.*"%>
<%@ page import="com.gzgi.framework.context.*"%>
<%@ page import="com.gzgi.framework.todo.*"%>
<%@ page import="com.gzgi.framework.sys.*"%>
<%@ page import="com.gzgi.framework.calendar.*"%>
<%
        String type = request.getParameter("type");
        SchedulerService schedulerService = (SchedulerService)ContextFactory.getBean("schedulerService");
		if("start".equals(type)){
		    schedulerService.restart("2");
		} else if("stop".equals(type)){
		    schedulerService.stop("2");
		}
%>
<script language="javascript">
     function startupX(){
         document.getElementById("type").value="start";
		 document.iForm.submit();
     }
    function shutdownX(){
         document.getElementById("type").value="stop";
		 document.iForm.submit();
     }
</script>
<form name="iForm" method="post" action="">
    <input type="hidden" id="type" name="type">
	<input type="button" name="startup" value="start" onclick="javascript:startupX();">
	<input type="button" name="shutdown" value="stop" onclick="javascript:shutdownX();">
</form>